package com.mysoft.bmsdataexchange;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableEurekaClient
@EnableTransactionManagement
public class BmsDataexchangeApplication {

    public static void main(String[] args) {
        SpringApplication.run(BmsDataexchangeApplication.class, args);
    }

    /**
     * 负载均衡策率配置
     *
     *  1. 首先要在配置文件中配置
     *      dataExchange.ribbon.NFLoadBalancerRuleClassName=com.netflix.loadbalancer.RandomRule
     *  2. 需要在启动类配置
     *
     * @return
     */
    /*
    @Bean
    public IRule ribbonRule() {
        return new RandomRule();
    }
    */
}
